<div class="formPanel">
    <fieldset>
        <legend>Tìm kiếm</legend>
        <form id="search_form_user" action="<?php echo base_url(); ?>admin_combo/user/searchdata" method="post">
            <label>Tên đăng nhập:</label>
            <input type="text" id="txtUsername" name="txtUsername" size="30" value="" /><br />
            <label>Họ tên:</label>
            <input type="text" id="txtFulName" name="txtFulName" size="30" value="" /><br />
            <label>Địa chỉ:</label>
            <input type="text" id="txtAddress" name="txtAddress" size="30" value="" /><br />
            <label>Điện thoại:</label>
            <input type="text" id="txtPhone" name="txtPhone" size="30" value="" /><br />
            <label>Email:</label>
            <input type="text" id="txtEmail" name="txtEmail" size="30" value="" /><br />
            <label>Cấp bậc:</label>
            <?php callLevel($sl_level); ?>
            <input type="submit" class="button" id="btnSearchUser" name="btnSearchUser" value="Tìm Kiếm" />
        </form>
    </fieldset>
</div>
<div align="center">
    <div id="recorddata">
        <table>
            <tr>
                <td class="title">Stt</td>
                <td class="title">Tên Đăng Nhập</td>
                <td class="title">Họ Tên</td>
                <td class="title">Địa Chỉ</td>
                <td class="title">Điện thoại</td>
                <td class="title">Email</td>
                <td class="title">Level</td>
                <td class="title">Edit</td>
                <td class="title">Del</td>
            </tr>
            <?php
                if($info != "empty") {
                    $stt=0;
                    foreach($info as $item) {
                        $stt++;
                        echo "<tr>";
                        echo    "<td>$stt</td>";
                        echo    "<td>$item[u_username]</td>";
                        echo    "<td>$item[u_fullname]</td>";
                        echo    "<td>$item[u_address]</td>";
                        echo    "<td>$item[u_phone]</td>";
                        echo    "<td>$item[u_email]</td>";
                        if($item["level_name"]=="admin")
                            echo    "<td><font color='red'>$item[level_name]</font></td>";
                        else
                            echo    "<td>$item[level_name]</td>";
                        echo    "<td class='action edit'><a href='".base_url()."admin_combo/user/edit/$item[u_id]' id='edit_$item[u_id]'><strong>Edit</strong></a></td>";
                        echo    "<td class='action del'><a href='".base_url()."admin_combo/user/del/$item[u_id]' id='del_$item[u_id]' 
                                    onclick='return confirm_delete(\"Khi xóa sẽ xóa các bài viết, phiếu xuất, chi tiết phiếu xuất của người dùng này. Bạn có chắc chắn muốn xóa?\");'><strong>Del</strong></a></td>";
                        echo "</tr>";
                    }
                }else
                    echo "<tr><td colspan='9'><font style='color: #99CC00; font-weight: bold;'>$info</font></td></tr>"
            ?>
        </table>
        <?php
            echo $this->pagination->create_links();
        ?>
    </div>
</div>
